﻿@namespace BlazorComponent
@inherits BDomComponentBase

<CascadingValue Value="IsDark" Name="IsDark">
    <div class="@CssProvider.GetClass()" style="@CssProvider.GetStyle()" id="@Id" @ref="Ref" @attributes="Attributes">
        <CascadingValue Value="this" IsFixed=true>
            @if (Items != null && Items.Any())
            {
                foreach (var item in Items)
                {
                    <DynamicComponent Type=item.GetType() Parameters=item.ToParameters() @key=item></DynamicComponent>
                }
            }
            else if(_firstRender)
            {
                @ChildContent
            }
        </CascadingValue>
    </div>
</CascadingValue>